<html>
<head>
    <css file="__PUBLIC__/css/body.css"/>
    <css file="__STATIC__/icon/icon.css"/>
    <css file="__STATIC__/wbElement/wbElement.css"/>
    <js file="__STATIC__/jquery-1.7.2.min.js"/>
    <js file="__STATIC__/wbElement/wbElement.js"/>
</head>
<body>
    <div class="top">
        <div class="position"><span class="icon icon-31"></span>当前位置：权限管理</div>
        <div class="top-title">
            <span class="icon icon-32"></span>
            <div class="top-tool">
                <a class="button-a" href="{:U('Rbac/addNode')}">添加顶级权限</a>
            </div>
        </div>
    </div>
    <div class="body">
        <table class="list-tb" border="0" cellpadding="0" cellspacing="4">
            <foreach name='node' item='app'>
            <tr>
                <td><span style="color: green;font-weight:bold;">+</span>&ensp;<strong>{$app.title}</strong></td>
                <td width="25%" class="operate">
                    <a href="{:U('Rbac/addNode',array('pid'=>$app['id'],'level'=>2))}"><span class="icon icon-46"></span>添加</a>
                    <a href="{:U('Rbac/modifyNode',array('nid'=>$app['id']))}"><span class="icon icon-43"></span>修改</a>
                    <a href="{:U('Rbac/deleteNode',array('nid'=>$app['id']))}"><span class="icon icon-44"></span>删除</a>
                </td>
            </tr>
            <foreach name='app.child' item='action'>
            <tr>      
                <td><span style="color: green;font-weight:bold;margin-left:20px;">+</span>&ensp;<strong>{$action.title}</strong></td>
                <td class="operate">
                    <a href="{:U('Rbac/addNode',array('pid'=>$action['id'],'level'=>3))}"><span class="icon icon-46"></span>添加</a>
                    <a href="{:U('Rbac/modifyNode',array('nid'=>$action['id']))}"><span class="icon icon-43"></span>修改</a>
                    <a href="{:U('Rbac/deleteNode',array('nid'=>$action['id']))}"><span class="icon icon-44"></span>删除</a>
                </td>
            </tr>
            <foreach name='action.child' item='method'>
            <tr>
                <td><span style="color: green;font-weight:bold;margin-left: 40px;">√</span>&ensp;<span>{$method.title}</span></td>
                <td class="operate">
                    <a><span class="icon icon-46"></span>查看</a>
                    <a href="{:U('Rbac/modifyNode',array('nid'=>$method['id']))}"><span class="icon icon-43"></span>修改</a>
                    <a href="{:U('Rbac/deleteNode',array('nid'=>$method['id']))}"><span class="icon icon-44"></span>删除</a>
                </td>
            </tr>
            </foreach>
            </foreach>
            </foreach>   
        </table>
    </div>
</body>
</html>